import api from '../utils/apiUtils';

// 获取菜单基本信息
export function getMenuDetial (params) {
  return api.get (`/shop/menus/${params}`);
}

// 获取菜单信息
export function getMenus (params) {
  return api.get ('/shop/menus/page', params);
}

//删除菜单
export function delMenu (params) {
  return api.delete (`/shop/menus/`, params);
}

//修改菜单
export function editMenu (id, params) {
  return api.put (`/shop/menus/${id}`, params);
}

//新增菜单
export function addMenu (params) {
  return api.post (`/shop/menus/`, params);
}

// 根据菜单类型输出上级
export function getParent (params) {
  return api.get (`/shop/menus/Type/${params}`);
}
